import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TaskModule } from './task/task.module';//任务列表模块
import { TypeOrmModule } from '@nestjs/typeorm';//链接数据库
@Module({
  controllers: [AppController],
  providers: [AppService],
  imports: [
    //链接数据库
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: '113.44.253.107',
      port: 3306,
      username: 'taskmanagement',
      password: '20031007',
      database: 'taskmanagement',
      entities: [__dirname + '/**/*.entity{.ts,.js}'],
      synchronize: true,
    }),
    //到处任务列表模块
    TaskModule,
  ],
})
export class AppModule {}
